package com.qf.before;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @author Ypl
 * @version V1.0
 * @Project September-mavens
 * @Package com.qf.before
 * @Description:
 * @Date 2022/9/27 19:28
 */
@SuppressWarnings("all")
public class MyBeanPostProcessor implements BeanPostProcessor {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("后处理器： 在init 之前执行" + bean.getClass());
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("后处理器： 在init 之后执行" + bean.getClass());
        return bean;
    }

}
